﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace EuroManager.Presentation.WebPortal.GameViewer.Updates
{
    public class SpeedUpdate : IGameUpdate
    {
        private ISpeedController speedController;
        private float speed;
        private bool performed = false;

        public SpeedUpdate(ISpeedController speedController, float speed)
        {
            this.speedController = speedController;
            this.speed = speed;
        }

        public void Perform(float elapsedTime)
        {
            if (!performed)
            {
                performed = true;
                speedController.Speed = speed;
            }
        }

        public void Revert(float elapsedTime)
        {
        }
    }
}
